import { createRouter, createWebHistory } from 'vue-router';

const Home = () => import('@/pages/Home');
const About = () => import('@/pages/About');
// import Home from '@/pages/Home';

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
  },
  {
    path: '/about',
    component: About,
  },
]

const router =  createRouter({
  history: createWebHistory(), // 使用history
  routes,
});

export default router;

